package com.oop3.test1;

/**
 * Created by L.jp
 * Description:
 * User: 86189
 * Date: 2022-09-18
 * Time: 21:17
 */
//object.tostring()的使用
public class Student /*extends Object*/{
    private String name;
    private int age;
    private double height;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public double getHeight() {
        return height;
    }
    public void setHeight(double height) {
        this.height = height;
    }
    public Student() {
    }
    public Student(String name, int age, double height) {
        this.name = name;
        this.age = age;
        this.height = height;
    }
    /*public String toString() {
        return "这是一个Student对象，这个对象的名字："+name+",年龄："+age+",身高："+height;
    }*/
    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", height=" + height +
                '}';
    }
}
